package com.hippomeetsskunk.savanna.rules;

import java.util.Set;

import com.hippomeetsskunk.savanna.types.goal.Goal;
import com.hippomeetsskunk.savanna.types.meta.ResourceType;
import com.hippomeetsskunk.savanna.types.person.Person;
import com.hippomeetsskunk.savanna.types.person.Skills;
import com.hippomeetsskunk.savanna.types.world.World;

public class RulesGateway {

	public static void startDay(World world){
		world.startDay();
	}
	
	public static double isSkilledForImprovement(Person worker, Goal goal){
		Skills requiredSkills = goal.getRequiredSkills();
		return requiredSkills.getSkillFactor(worker);
	}
	
	public static Set<ResourceType> hasResourcesForImprovement(Person worker, Goal goal){
		Set<ResourceType> missingResources = worker.getMissingResources(goal.getRequiredResources());
		return missingResources;
	}
}
